package com.lyj.mode.principle.demeter;

import java.util.ArrayList;
import java.util.List;

/**
 * 公司员工管理员
 * @author:liyajie
 * @createTime:2022/2/8 11:51
 * @version:1.0
 */
public class CompanyManagerNew {

    /**
     * 查询公司员工
     * @author: liyajie
     * @date: 2022/2/8 12:42
     * @param
     * @return java.util.List<com.lyj.mode.principle.demeter.CompanyEmployee>
     * @exception:
     * @update:
     * @updatePerson:
     **/
    public List<CompanyEmployee> getCompanyEmployee(){
        List<CompanyEmployee> list = new ArrayList<CompanyEmployee>();
        for (int i = 0; i < 5; i++) {
            CompanyEmployee companyEmployee = new CompanyEmployee();
            companyEmployee.setId("公司员工，id是" + i);
            list.add(companyEmployee);
        }
        return list;
    }

    /**
     * 打印公司员工id
     * @author: liyajie
     * @date: 2022/2/8 12:41
     * @param
     * @return void
     * @exception:
     * @update:
     * @updatePerson:
     **/
    public void printCompanyEmployee(){
        List<CompanyEmployee> list = getCompanyEmployee();
        for (CompanyEmployee companyEmployee: list) {
            System.out.println(companyEmployee.getId());
        }
    }
}
